home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / src / misc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-08  |  2.9 KB  |  117 lines

  1. /* misc.h -- prototypes for the functions in misc.c. */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_MISC_H
  23. #define _GIT_MISC_H
  24.  
  25.  
  26. #include <sys/types.h>
  27.  
  28. #ifdef TIME_WITH_SYS_TIME
  29. #include <sys/time.h>
  30. #include <time.h>
  31. #else
  32. #ifdef HAVE_SYS_TIME_H
  33. #include <sys/time.h>
  34. #else
  35. #include <time.h>
  36. #endif
  37. #endif
  38.  
  39. #include "stdc.h"
  40.  
  41.  
  42. extern pid_t pid;
  43. extern char *home;
  44. extern char *program;
  45. extern char *tty_type;
  46.  
  47. extern char  *tty_name;
  48. extern size_t tty_name_len;
  49. extern char  *login_name;
  50. extern size_t login_name_len;
  51.  
  52. extern char *day_name[];
  53. extern char *month_name[];
  54.  
  55. extern int SCREEN_X;
  56. extern int SCREEN_Y;
  57.  
  58. extern char cSection[];
  59. extern char bwSection[];
  60.  
  61.  
  62. #define max(a, b) (((a) >= (b)) ? (a) : (b))
  63. #define min(a, b) (((a) <= (b)) ? (a) : (b))
  64.  
  65.  
  66. #define close2(fd1, fd2)        \
  67. {                               \
  68.      close(fd1);                \
  69.      close(fd2);                \
  70. }
  71.  
  72.  
  73. #define xfree2(ptr1, ptr2)      \
  74. {                               \
  75.      xfree(ptr1);               \
  76.      xfree(ptr2);               \
  77. }
  78.  
  79.  
  80. typedef struct file_type_info_tag
  81. {
  82.     char *regexp;
  83.     int foreground;
  84.     int background;
  85.     int brightness;
  86.     struct file_type_info_tag *next;
  87. } file_type_info_t;
  88.  
  89.  
  90. extern file_type_info_t * fti_head;
  91.  
  92.  
  93. extern RETSIGTYPE fatal_signal __P((int));
  94. extern void display_exit_message __P((char *));
  95. extern void configuration_help __P((char *));
  96. extern void common_configuration_init __P(());
  97. extern void specific_configuration_init __P(());
  98. extern void use_section __P((char *));
  99. extern int get_int_var __P((char *, int));
  100. extern int get_const_var __P((char *, char *[], int, int));
  101. extern int get_flag_var __P((char *, int));
  102. extern char *get_string_var __P((char *, char *));
  103. extern void get_colorset_var __P((int *, char *[], int));
  104. extern char *clear_path __P((char *));
  105. extern void get_tty_name __P(());
  106. extern void get_login_name __P(());
  107. extern void truncate_long_name __P((char *, char *, size_t));
  108. extern char *truncate_string __P((char *, char *, size_t));
  109. extern int get_file_length __P((int));
  110. extern struct tm *get_local_time __P(());
  111. extern char *xbasename __P((char *));
  112. extern int is_a_bg_command __P((char *));
  113. extern void get_file_type_info __P(());
  114.  
  115.  
  116. #endif  /* _GIT_MISC_H */
  117.